/**
 * 
 */
package com.grp6.game.player;

import java.util.List;

import com.grp6.game.difficultystrategy.INextMoveStrategy;
import com.grp6.game.gameactions.IMove;

/**
 * Represents the Computer Player containing methods to read moves
 * and the difficulty strategy that is to be implemented
 * @author Group6
 */
public abstract class AbstractComputerPlayer implements IComputerPlayer{
	
	protected INextMoveStrategy currentAIstrategy;
	
	public AbstractComputerPlayer(INextMoveStrategy currentAIstrategy){
		this.currentAIstrategy = currentAIstrategy;
	}

	/**
	 * Returns the next move of the computer player 
	 * according to the current difficulty level
	 * @return Move object
	 */
	public final IMove getNextMove(){
		return currentAIstrategy.getNextMove();
	}
	
	/**
	 * Returns the list of possible moves that are possible 
	 * for the computer player at the current difficulty level
	 * @return List of Move objects
	 */
	public final List<IMove> getSuggestedMoves(){
		return currentAIstrategy.getSuggestedMoves();
	}
	
	/**
	 * Returns the current difficulty level of computer player set
	 * @return NextMoveStrategy object
	 */
	public INextMoveStrategy getNextMoveStrategy(){
		return currentAIstrategy;
	}
	
	public void setNextMoveStrategy(INextMoveStrategy aIstrategy){
		this.currentAIstrategy = aIstrategy;
	}
}
